package com.chinasofti.callable;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class MyCalloDledemo {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCalloble mc = new MyCalloble();
        FutureTask<String> ft = new FutureTask<>(mc);
        Thread t1 = new Thread(ft);
        t1.start();
        String s = ft.get();
        System.out.println(s);

    }
}
